import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 添加路由标题处理
router.beforeEach((to, from, next) => {
    const title = to.meta.title || 'Vite + Vue'
    document.title = title
    next()
})

const app = createApp(App)
app.use(router);
app.use(ElementPlus);
app.mount('#app');
// createApp(App).use(router).use(ElementPlus).mount('#app')
